import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    //1.state:负责存储
    userInfo: {}
  },
  mutations: {
    //2.mutations:负责修改
    //更新userInfo
    updateUserInfo(state, newData) {
      state.userInfo = newData
    }
  },
  actions: {},
  modules: {}
})
